package cn.com.dao;

import cn.com.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserMapper {
    @Select("select * from t_user where accountNumber=#{accountNumber}")
    public User getByAN(String accountNumber);


    @Insert("insert into t_user values(null,#{userName},#{accountNumber},#{passWord},#{telphone},#{problem},#{answer})")
    public int add(User user);

    @Update("update t_user set userName=#{userName},passWord=#{passWord},accountNumber=#{accountNumber}," +
            "telphone=#{telphone},problem=#{problem},answer=#{answer} where id=#{id}")
    public int update(User user);
}
